package com.leyou.item.service.service;

import com.leyou.common.bean.Result;
import com.leyou.item.inter.dto.SpecSelectDTO;
import com.leyou.item.inter.pojo.SpecGroup;
import com.leyou.item.inter.pojo.SpecParam;

import java.util.List;

/**
 * @author zqq
 * @ClassName SpecGroupParamService
 * @Description: 商品规格参数接口
 * @date 2020/3/7-9:07
 */
public interface SpecGroupParamService {

    /**
     * @Title: queryGroupsByCid
     * @Description: 根据分类id查询分组
     * @author: zqq
     * @param cid 分类id
     * @return: com.leyou.common.bean.Result<java.util.List<com.leyou.item.inter.pojo.SpecGroup>>
     * @createTime: 2020-03-07 9:10
     * @version: v.1.0
     */
    Result<List<SpecGroup>> queryGroupsByCid(Long cid);

    /**
     * @Title: queryParams
     * @Description: 根据规格参数条件查询规格参数
     * @author: zqq
     * @param dto 参数类
     * @return: com.leyou.common.bean.Result<java.util.List<com.leyou.item.inter.pojo.SpecParam>>
     * @createTime: 2020-03-07 9:12
     * @version: v.1.0
     */
    Result<List<SpecParam>> queryParams(SpecSelectDTO dto);

    /**
     * @Title: queryGroupsWithParam
     * @Description: 查询规格参数组，及组内参数
     * @author: zqq
     * @param cid 分类id
     * @return: com.leyou.common.bean.Result<java.util.List<com.leyou.item.inter.pojo.SpecGroup>>
     * @createTime: 2020-03-08 10:09
     * @version: v.1.0
     */
    Result<List<SpecGroup>> queryGroupsWithParam(Long cid);

    /**
     * @Title: saveSepcGroup
     * @Description: 新增规格
     * @author: zqq
     * @param entity
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-20 8:35
     * @version: v.1.0
     */
    Result saveSepcGroup(SpecGroup entity);

    /**
     * @Title: updateSepcGroup
     * @Description: 修改规格
     * @author: zqq
     * @param entity
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-20 8:35
     * @version: v.1.0
     */
    Result updateSepcGroup(SpecGroup entity);

    /**
     * @Title: deleteSepcGroup
     * @Description: 删除规格
     * @author: zqq
     * @param id
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-20 8:35
     * @version: v.1.0
     */
    Result deleteSepcGroup(Long id);

    /**
     * @Title: saveSpecParam
     * @Description: 新增规格参数
     * @author: zqq
     * @param entity
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-20 8:35
     * @version: v.1.0
     */
    Result saveSpecParam(SpecParam entity);

    /**
     * @Title: updateSpecParam
     * @Description: 删除规格参数
     * @author: zqq
     * @param entity
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-20 8:35
     * @version: v.1.0
     */
    Result updateSpecParam(SpecParam entity);

    /**
     * @Title: deleteSpecParam
     * @Description: 删除规格参数
     * @author: zqq
     * @param id
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-20 8:35
     * @version: v.1.0
     */
    Result deleteSpecParam(Long id);
}
